home *** CD-ROM | disk | FTP | other *** search
-
- /******************************* strlist.h *********************************
-
- Purpose: Simple string list abstract data type module header
-
- Notes: This module implements a straightforward string ordered list
- abstract data type. It is optimized for appending and deleting
- from the end of the list. Since they are ordered lists, string
- lists may be sorted, and their members are addressed by ordinal
- position (starting from 0).
- **/
-
- #ifndef STRLIST_H
- #define STRLIST_H
-
- /******************************************************************************/
- /**************************** Public Constants ****************************/
-
- #define NULL_INDEX -1 /* invalid string index */
-
- /******************************************************************************/
- /****************************** Public Types ******************************/
-
- typedef struct _StrListStruct *StrList; /* the base string list type */
-
- /******************************************************************************/
- /**************************** Public Routines *****************************/
-
- #ifdef __STDC__
-
- extern void StrListAppend( StrList list, string */ );
- extern void StrListAppendFile( StrList list, char *filename );
- extern StrList StrListCreate( void );
- extern void StrListDestroy( StrList list );
- extern int StrListEqual( StrList list1, StrList list2 );
- extern char * StrListPeek( StrList list, int index );
- extern int StrListSize( StrList list );
- extern void StrListSort( StrList list );
- extern void StrListUnique( StrList list );
-
- #else
-
- extern void StrListAppend( /* list, string */ );
- extern void StrListAppendFile( /* list, filename */ );
- extern StrList StrListCreate( /* void */ );
- extern void StrListDestroy( /* list */ );
- extern int StrListEqual( /* list1, list2 */ );
- extern char * StrListPeek( /* list, index */ );
- extern int StrListSize( /* list */ );
- extern void StrListSort( /* list */ );
- extern void StrListUnique( /* list */ );
-
- #endif
- #endif
-